﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
   <%@ include file="/WEB-INF/component/commonCSS.jsp" %>
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
     <style type="text/css">
        span.required {
    		color: red;
    		margin-right: 6px;
    	}
    	div.box-body {
    		margin-top:7px;
    	}
    	.box-body {
           margin-bottom: -10px;
        }
    </style>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1><spring:message code="message.lable.compinfoSTDedit"/></h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.StdManage"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.compinfoStd"/></a></li>
        </ol>
    </section>
    <section class="content">
      <!-- form start -->
       <form role="form" class="form-horizontal" id="FormSubmit" action="${ctx}/stdCompinfo/stdCompinfoAdd.html" method="post">
          <input type="hidden" name="compId" id="compId" value="${list.get(0).compId}" />
          <input type="hidden" name="status" id="status" value="${list.get(0).status}" />
          <input type="hidden" name="compCode" id="compCode" value="${list.get(0).compCode}" />
        <div class=" box box-success">
          <div class="box-header with-border">
            <h3 class="box-title"><spring:message code="message.listForm.qiYeXinXi"/>
                <span id="hospCode" style="color:#cccccc;font-size:15px;} " >${list.get(0).compCode }</span>
            </h3>
            </div>
                <div class="box-body">
                     <div class="form-group form-group-xs">
                       
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.qiYeMingCheng"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.qiYeMingCheng"/>"  name="compName" id="compName" type="text" maxlength="42" value="${list.get(0).compName }">
                        </div>
                    </div> 
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><spring:message code="message.listForm.qiYeJianCheng"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.qiYeJianCheng"/>" name="compShortName" id="compShortName" type="text" maxlength="21" value="${list.get(0).compShortName }">
                        </div>
                        <label class="col-sm-3 text-right"><spring:message code="message.listForm.qiYeMingChengEglish"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.qiYeMingChengEglish"/>" name="compNameEng" id="compNameEng" type="text" maxlength="512" value="${list.get(0).compNameEng }">
                        </div>
                    </div>
                     
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.zuZhiJiGouDaiMa"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.zuZhiJiGouDaiMa"/>" name="orgCode" id="orgCode" type="text" maxlength="20" value="${list.get(0).orgCode }">
                        </div>
                        <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.suoShuDiQu"/>:</label>
                        <div class="col-sm-3 text-left">
                             <select class="form-control" id="area1" style="width: 83px;display:inline-block;"></select> 
                             <select class="form-control" id="area2" style="width: 82px;display:inline-block;"></select>
                             <select class="form-control" id="area3" name="areaId" style="width: 80px;display:inline-block;"></select>
                        </div>
                    </div>
                    
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.qiYeLeiXing"/>：</label>
                        <div class="col-sm-3 text-left">
                            <select class="form-control" name="compType" id="compType">
                            <option value="${list.get(0).compType}" selected="selected">${list.get(0).compType==1?'生产企业':'配送企业'}</option>
                            </select>
                        </div>
                        
                        <label class="col-sm-3 control-label"><spring:message code="message.listForm.suoShuJiTuan"/>：</label>
                        <div class="col-sm-3">
                            <select class="form-control" name="compGroupId" id="compGroupId"></select>
                        </div>
                   </div>
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.qiYeFenLei"/>：</label>
                        <div class="col-sm-3 text-left">
                            <select class="form-control" name="compClassify" id="compClassify">
                              <option value="${list.get(0).compClassify==0?0:list.get(0).compClassify}" selected="selected">${list.get(0).compClassify==0?'默认':list.get(0).compClassify==1?'药品':list.get(0).compClassify==2?'耗材':'药品耗材'}</option>
                             <option value="${list.get(0).compClassify==0?1:0}" >${list.get(0).compClassify==0?'药品':list.get(0).compClassify==1?'默认':list.get(0).compClassify==2?'默认':'默认'}</option>
                             <option value="${list.get(0).compClassify==0?2:list.get(0).compClassify==1?2:1}">${list.get(0).compClassify==0?'耗材':list.get(0).compClassify==1?'耗材':'药品'}</option>
                             <option value="${list.get(0).compClassify==0?3:list.get(0).compClassify==1?3:list.get(0).compClassify==2?3:2}">${list.get(0).compClassify==0?'药品耗材':list.get(0).compClassify==1?'药品耗材':list.get(0).compClassify==2?'药品耗材':'耗材'}</option>
                            </select>
                        </div>
                        
                        <label class="col-sm-3 control-label"><spring:message code="message.listForm.LiShiqiYeBianMa"/>：</label>
                        <div class="col-sm-3">
                           <input class="form-control" placeholder="<spring:message code="message.listForm.LiShiqiYeBianMa"/>" name="historyCode" id="historyCode" maxlength="33" type="text" value="${list.get(0).historyCode }">
                        </div>
                   </div>
                    <div class="form-group form-group-xs">
                         <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.qiYeZhuCeLeiXing"/>：</label>
                          <input type="hidden" id="compRegValue" name="compRegId">
                        <div class="col-sm-3 text-left">
                            <select class=" form-control" id="compRegId" style="width: 49%;display:inline-block;" ></select>
                             <select class="form-control"  id="compRegId2" style="width: 48%;display:inline-block;"></select>
                        </div>
                         <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.jiGouDianHua"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.jiGouDianHua"/>  <spring:message code="message.listForm.liRu"/>010—87654321" name="compPhone" id="compPhone" maxlength="20" type="text" value="${list.get(0).compPhone }">
                        </div>
                    </div>
                   <div class="form-group form-group-xs">
                       <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.jiGouDiZhi"/>：</label>
                        <div class="col-sm-9 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.jiGouDiZhi"/>" name="compAddress" id="compAddress" type="text" maxlength="341" value="${list.get(0).compAddress }">
                        </div>
                    </div>
                </div>
               
               
                <div class="box-header with-border">
                   <h3 class="box-title"><spring:message code="message.listForm.faRenxinxi"/></h3>
                </div>
                <div class="box-body">                   
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.faDingDaiBiaoRen"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.faDingDaiBiaoRen"/>" name="legalRepName" id="legalRepName" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.legalRepName }">
                        </div>
                        <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.zhuCheZiBenDanWei"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.zhuCheZiBen"/>" name="regCap" id="regCap" type="text" maxlength="18" value="${list.get(0).stdCompinfoDetail.regCapStr }">
                        </div>
                    </div>
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.faRenShengFenZheng"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.faRenShengFenZheng"/>  <spring:message code="message.listForm.liRu"/>53010219200508011x" name="legalRepIdnum" id="legalRepIdnum" type="text" maxlength="18" value="${list.get(0).stdCompinfoDetail.legalRepIdnum }">
                        </div>
                        <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.faRenDianHua"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.faRenDianHua"/>  <spring:message code="message.listForm.liRu"/>010—87654321" name="legalRepTelephone" id="legalRepTelephone" maxlength="20" type="text" value="${list.get(0).stdCompinfoDetail.legalRepTelephone }">
                        </div>
                    </div>
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.faRenShouJi"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.faRenShouJi"/> <spring:message code="message.listForm.liRu"/>13907199856" name="legalRepHandphone" id="legalRepHandphone" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.legalRepHandphone }">
                        </div>
                        
                    </div>
                  </div>
               
                 
                <div class="box-header with-border">
                   <h3 class="box-title"><spring:message code="message.listForm.shengChanJingYingXuKeZhengXinxi"/></h3>
                </div>
                <div class="box-body"> 
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.shengChanJingYingFanWei"/>：</label>
                        <div class="col-sm-9 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.shengChanJingYingFanWei"/>" name="bizScope" id="bizScope" type="text" maxlength="1333" value="${list.get(0).stdCompinfoDetail.bizScope }">
                        </div>
                    </div>
                     <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.shengChanJingYingXuKeZhengHao"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.shengChanJingYingXuKeZhengHao"/>" name="indusCode" id="indusCode" type="text" maxlength="33" value="${list.get(0).stdCompinfoDetail.indusCode }">
                        </div>
						 <label for="indusCodeDate" class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.youXiaoQi"/>：</label>
						 <div class="col-sm-3"> 
                                <table style="width:100%;">
                                     <tr>
                                        <td style="width:50%">
                                            <input class="form-control" type="text" readonly="readonly" id="indusCodeStartDate"  name="indusCodeStartDate"  placeholder="yyyy-MM-dd"  value="${list.get(0).stdCompinfoDetail.indusCodeStartDateStr }"
                onFocus="var endDate=$dp.$('indusCodeEndDate');WdatePicker({maxDate:'#F{$dp.$D(\'indusCodeEndDate\')}'})" >
                                        </td>
                                        <td>&nbsp;-&nbsp;</td>
                                        <td style="width:50%">
                                           <input class="form-control" type="text" readonly="readonly" id="indusCodeEndDate"  name="indusCodeEndDate" placeholder="yyyy-MM-dd"  value="${list.get(0).stdCompinfoDetail.indusCodeEndDateStr }"  
             onFocus="WdatePicker({minDate:'#F{$dp.$D(\'indusCodeStartDate\')}'})"  >
                                        </td>
                                     </tr>
                                </table>
                        </div> 
                    </div>
                     <div class="form-group form-group-xs">
					   <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.shuiWuDengJiZhengHao"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.shuiWuDengJiZhengHao"/>" name="taxCode" id="taxCode" type="text" maxlength="33" value="${list.get(0).stdCompinfoDetail.taxCode }">
                        </div>

                    </div>
                   </div> 
              
                    
                <div class="box-header with-border">
                   <h3 class="box-title"><spring:message code="message.listForm.yingYeZhiZhaoXinXi"/></h3>
                </div>
                <div class="box-body">      
                     <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.yingYeZhiZhaoHao"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.yingYeZhiZhaoHao"/>" name="bizLiceNo" id="bizLiceNo" type="text" maxlength="33" value="${list.get(0).stdCompinfoDetail.bizLiceNo }">
                        </div>
						<label  class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.youXiaoQi"/>：</label>
						<div class="col-sm-3"> 
                                <table style="width:100%;">
                                     <tr>
                                        <td style="width:50%">
                                            <input class="form-control" type="text" readonly="readonly" id="bizLiceStartDate"  name="bizLiceStartDate"  placeholder="yyyy-MM-dd"  value="${list.get(0).stdCompinfoDetail.bizLiceStartDateStr }" 
                onFocus="var endDate=$dp.$('bizLiceEndDate');WdatePicker({maxDate:'#F{$dp.$D(\'bizLiceEndDate\')}'})" >
                                        </td>
                                        <td>&nbsp;-&nbsp;</td>
                                        <td style="width:50%">
                                           <input class="form-control" type="text" readonly="readonly" id="bizLiceEndDate"  name="bizLiceEndDate" placeholder="yyyy-MM-dd"   value="${list.get(0).stdCompinfoDetail.bizLiceEndDateStr }"
             onFocus="WdatePicker({minDate:'#F{$dp.$D(\'bizLiceStartDate\')}'})"  >
                                        </td>
                                     </tr>
                                </table>
                        </div> 
                    </div>
                    
                  </div>
                 
                
                <div class="box-header with-border">
                   <h3 class="box-title"><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoXinXi"/></h3>
                </div>
                <div class="box-body"> 
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoHao"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoHao"/>" name="legalRepCertCode" id="legalRepCertCode" maxlength="33" type="text" maxlength="100" value="${list.get(0).stdCompinfoDetail.legalRepCertCode }">
                        </div>
						<label  class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.youXiaoQi"/>：</label>
						<div class="col-sm-3"> 
                                <table style="width:100%;">
                                     <tr>
                                        <td style="width:50%">
                                            <input class="form-control" type="text" readonly="readonly" id="legalRepStartDate"  name="legalRepStartDate"  placeholder="yyyy-MM-dd"   value="${list.get(0).stdCompinfoDetail.legalRepStartDateStr }" 
                onFocus="var endDate=$dp.$('legalRepEndDate');WdatePicker({maxDate:'#F{$dp.$D(\'legalRepEndDate\')}'})" >
                                        </td>
                                        <td>&nbsp;-&nbsp;</td>
                                        <td style="width:50%">
                                            <input class="form-control" type="text" readonly="readonly" id="legalRepEndDate"  name="legalRepEndDate" placeholder="yyyy-MM-dd"   value="${list.get(0).stdCompinfoDetail.legalRepEndDateStr }"
             onFocus="WdatePicker({minDate:'#F{$dp.$D(\'legalRepStartDate\')}'})"  >
                                        </td>
                                     </tr>
                                </table>
                        </div> 
                    </div>
                    
                  </div>
                    
                    
                <div class="box-header with-border">
                   <h3 class="box-title"><spring:message code="message.listForm.liangXiRenxinxi"/></h3>
                </div>
                <div class="box-body">    
                     <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.liangXiRenXingMing"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.liangXiRenXingMing"/>" name="contactName" id="contactName" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.contactName }">
                        </div>
                        <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.liangXiRenShengFenZheng"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.liangXiRenShengFenZheng"/>  <spring:message code="message.listForm.liRu"/>53010219200508011x" name="contactIdnum" id="contactIdnum" type="text" maxlength="18" value="${list.get(0).stdCompinfoDetail.contactIdnum }">
                        </div>
                    </div>
                    
                     <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.liangXiRenZhiWu"/>：</label>
                        <div class="col-sm-3 text-left"> 
                            <input class="form-control" placeholder="<spring:message code="message.listForm.liangXiRenZhiWu"/>" name="contactPos" id="contactPos" type="text" maxlength="21" value="${list.get(0).stdCompinfoDetail.contactPos }">
                        </div>
                        <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.liangXiRenDianHua"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.liangXiRenDianHua"/>  <spring:message code="message.listForm.liRu"/>010—87654321" name="contactTelephone" id="contactTelephone" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.contactTelephone }">
                        </div>
                    </div>
                    
                     <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><span class="required">*</span><spring:message code="message.listForm.liangXiRenShouJi"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.liangXiRenShouJi"/> <spring:message code="message.listForm.liRu"/>13907199856" name="contactHandphone" id="contactHandphone" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.contactHandphone }">
                        </div>
                        <label class="col-sm-3 text-right"><span class="required">*</span><spring:message code="message.listForm.liangXiRenYouXiang"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class=" form-control" placeholder="<spring:message code="message.listForm.liangXiRenYouXiang"/>  <spring:message code="message.listForm.liRu"/>**@**.com" name="contactEmail" id="contactEmail" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.contactEmail }">
                        </div>
                    </div>
                    <div class="form-group form-group-xs">
                        <label class="col-sm-2 text-right"><spring:message code="message.listForm.liangXiRenQQ"/>：</label>
                        <div class="col-sm-3 text-left">
                            <input class="form-control" placeholder="<spring:message code="message.listForm.liangXiRenQQ"/> <spring:message code="message.listForm.liRu"/>545969696" name="contactQq" id="contactQq" type="text" maxlength="20" value="${list.get(0).stdCompinfoDetail.contactQq }">
                        </div>
                    </div>
                   </div> 
                   <div class="box-footer text-center">
                    <button type="button" onclick="save();" class="btn btn-success btn-sm"><spring:message code="message.button.saveSpacing"/></button>
                    <a href="javascript:history.go(-1)" class="btn btn-danger btn-sm"><spring:message code="message.button.getBackSpacing"/></a>
                   </div>
                </div>
       </form>
      
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    <script type="text/javascript">
   // var p = 1;
    
    $(function(){
    	 $("#area1").HNSelect({
	            url: "${pageContext.request.contextPath}/selectController/getArea.html", data: { ID: '000000' },defaultselect:"${areaId1}",  defaultText: "<option value=''><spring:message code="message.select.option"/></option>",
	            func: function () {
	                $("#area2").HNSelect({
	                    parent_selector: "#area1", url: "${pageContext.request.contextPath}/selectController/getArea.html", dataid: "ID",defaultselect:"${areaId2}",defaultText: "<option value=''><spring:message code="message.select.option"/></option>",
	                    		  func: function () {
	                                  $("#area3").HNSelect({
	                                      parent_selector: "#area2", url: "${pageContext.request.contextPath}/selectController/getArea.html", dataid: "ID",defaultselect:"${areaId3}", defaultText: "<option value=''><spring:message code="message.select.option"/></option>",
	                                      func:function(){
	                                    	if($("#area1").children("option:selected").text()==""){
	                                  			$("#area1").val("");
  	                                  		} 
  	                                  		if($("#area2").children("option:selected").text()==""){
  	                                  			$("#area2").val("");
  	                                  		}
  	                                  		if($("#area3").children("option:selected").text()==""){
  	                                  			$("#area3").val("");
  	                                  		} 
	                                      }
	                                  });
	                              }
	                });
	            }
	        });
    	 //所属集团
    	 $("#compGroupId").HNSelect({
	            url: "${pageContext.request.contextPath}/selectController/getStdCompGroup.html", data: {compGroupId:""},defaultselect:"${list.get(0).compGroupId }",  defaultText: "<option value=''><spring:message code="message.select.option"/></option>"
	        });
    	 //企业注册类型
    	$("#compRegId").HNSelect({
            url: "${pageContext.request.contextPath}/selectController/getDicCompType.html", data: "ID", defaultselect:"${compRegId1}", defaultText: "<option value=''><spring:message code="message.select.option"/></option>",     
            	func: function () {
	                $("#compRegId2").HNSelect({
	                	isFirstSelect:1,
	                    parent_selector: "#compRegId", url: "${pageContext.request.contextPath}/selectController/getDicCompType.html" ,data: "ID",defaultselect:"${compRegId2}",defaultText: "<option value=''><spring:message code="message.select.option"/></option>"
	                });
	            }
        });
    });
  
    
    function save(){
    	if(!validateBase() || !validatePerfect()){
    		return;
    	} 
    	  $.HN.message.confirm('<spring:message code="message.HN.alert.OkSaveYESorNO"/>', '', '').on(function (e) {
              if (e) {
            	  $("#FormSubmit").ajaxSubmit({
            		  dataType : "json",
            		  success: function(result,statusText) {
                  		if(result.success){
                  			
          	     			$.alert("<spring:message code="message.HN.alert.baoCunCheng"/>", "success");
          	     			
          	     			
          	     			setTimeout("window.history.go(-1)",500);
          	     			
                  		}else{
                  			$.alert(result.msg || "<spring:message code="message.HN.alert.baoCunBai"/>", "error");
                  		}
              		  }
    	   	 });
            }
         });
    }
 	
   
 	function validateBase() {
 

		var compName = $.trim($("#compName").val());
		if (compName == null || compName == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.qiYeMingCheng"/>！",  "warn");
			return false;
		}else if(compName.length>42){
                $("#compName").trigger("focus");
                $.alert("<spring:message code="message.listForm.qiYeMingCheng"/><spring:message code="message.info.zuiDaChangDu"/>42<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#compName").val(compName);
		

		var compShortName = $.trim($("#compShortName").val());
        if (compShortName == null || compShortName == "") {
            
        }else if(compShortName.length>21){
                $("#compShortName").trigger("focus");
                $.alert("<spring:message code="message.listForm.qiYeJianCheng"/><spring:message code="message.info.zuiDaChangDu"/>21<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
        $("#compShortName").val(compShortName);
        
		
		var compNameEng = $.trim($("#compNameEng").val());
		if (compNameEng == null || compNameEng == "") {
			
		}else if(compNameEng.length>512){
                $("#compNameEng").trigger("focus");
                $.alert("<spring:message code="message.listForm.qiYeMingChengEglish"/><spring:message code="message.info.zuiDaChangDu"/>512<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#compNameEng").val(compNameEng);

		
		var orgCode = $.trim($("#orgCode").val());
		if (orgCode == null || orgCode == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.zuZhiJiGouDaiMa"/>！",  "warn");
			return false;
		} else if (!/^[a-zA-Z0-9_]+$/.test(orgCode)) {
			$.alert("<spring:message code="message.listForm.zuZhiJiGouDaiMa"/><spring:message code="message.yanZheng.zhiNengYouZiMuShuZiZuCheng"/>", "warn");
			return false;
		}else if(orgCode.length>20){
                $("#orgCode").trigger("focus");
                $.alert("<spring:message code="message.listForm.zuZhiJiGouDaiMa"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#orgCode").val(orgCode);
		
		
		var compType = $.trim($("#compType").val());
		if (compType == null || compType == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.qiYeLeiXing"/>！", "warn");
			return false;
		}
		$("#compType").val(compType);
		
		var area3 = $.trim($("#area3").val());
		if (area3 == null || area3 == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.diQu"/>！",  "warn");
			return false;
		}


		var compRegId = $.trim($("#compRegId2").val());
		if (compRegId == null || compRegId == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.qiYeZhuCeLeiXing"/>！", "warn");
			return false;
		}
		$("#compRegValue").val(compRegId);
		
		var historyCode = $.trim($("#historyCode").val());
		if (historyCode == null || historyCode == "") {
			
		}else if(historyCode.length>33){
                $("#historyCode").trigger("focus");
                $.alert("<spring:message code="message.listForm.LiShiqiYeBianMa"/><spring:message code="message.info.zuiDaChangDu"/>33<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#historyCode").val(historyCode);


		var compPhone = $.trim($("#compPhone").val());
		if (compPhone == null || compPhone == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.list.compinfoStdMergelist"/><spring:message code="message.listForm.dianHua"/>！",  "warn");
			return false;
		} else if (!/^(\d+[-]\d+)|(\d+)$/.test(compPhone)) {
			$.alert("请输入正确的企业电话！", "warn");
			return false;
		}else if(compPhone.length>20){
                $("#compPhone").trigger("focus");
                $.alert("<spring:message code="message.listForm.LiShiqiYeBianMa"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#compPhone").val(compPhone);
		
		var compAddress = $.trim($("#compAddress").val());
		if (compAddress == null || compAddress == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.list.compinfoStdMergelist"/><spring:message code="message.listForm.diZhi"/>！", "warn");
			return false;
		}else if(compAddress.length>341){
                $("#compAddress").trigger("focus");
                $.alert("<spring:message code="message.list.compinfoStdMergelist"/><spring:message code="message.info.zuiDaChangDu"/>341<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#compAddress").val(compAddress);
		
		return true;
	}
	
 	
 	
	function validatePerfect() {
		var reg = new RegExp(regexEnum.intege1);
		var regNum3 = new RegExp(regexEnum.regCapNum3);
		var regNum4 = new RegExp(regexEnum.regCapNum4);
			var legalRepName = $.trim($("#legalRepName").val());
		if (legalRepName == null || legalRepName == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.faDingDaiBiaoRen"/><spring:message code="message.listForm.xingMing"/>！", "warn");
			return false;
		}else if(legalRepName.length>20){
                $("#legalRepName").trigger("focus");
                $.alert("<spring:message code="message.listForm.faDingDaiBiaoRen"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;;
            }
		$("#legalRepName").val(legalRepName); 
		
		var regCap = $.trim($("#regCap").val());
		if (regCap == null || regCap == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.zhuCheZiBen"/>！", "warn");
			return false;
		} else if (isNaN(regCap)) {
			$.alert("<spring:message code="message.listForm.zhuCheZiBen"/><spring:message code="message.lable.daYuLingDeShu"/>", "warn");
			return false;
		}else if(regCap.length>18){
                $("#regCap").trigger("focus");
                $.alert("<spring:message code="message.listForm.zhuCheZiBen"/><spring:message code="message.info.zuiDaChangDu"/>18<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}else if(reg.test(regCap)){
			regCap += ".00";
            $("#regCap").val(regCap);
		}else if(regNum3.test(regCap)){
			regCap += "0";
            $("#regCap").val(regCap);
        } else if(!regNum4.test(regCap)){
            $.alert("<spring:message code="message.listForm.zhuCheZiBen"/><spring:message code="message.listForm.tianXieCuoWu"/>", "warn");
            return;
        }
		
		var legalRepIdnum = $.trim($("#legalRepIdnum").val());
		if (legalRepIdnum == null || legalRepIdnum == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.faRenShengFenZheng"/>！", "warn");
			return false;
		} else if (!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/.test(legalRepIdnum)) {
			$.alert("<spring:message code="message.listForm.faRenShengFenZheng"/><spring:message code="message.lable.FormatError"/>", "warn");
			return false;
		}else if(legalRepIdnum.length>18){
                $("#legalRepIdnum").trigger("focus");
                $.alert("<spring:message code="message.listForm.faRenShengFenZheng"/><spring:message code="message.info.zuiDaChangDu"/>18<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#legalRepIdnum").val(legalRepIdnum);

		var legalRepTelephone = $.trim($("#legalRepTelephone").val());
		if (legalRepTelephone == null || legalRepTelephone == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.faRenDianHua"/>！", "warn");
			return false;
		} else if (!/^(\d+[-]\d+)|(\d+)$/.test(legalRepTelephone)) {
			$.alert("<spring:message code="message.lable.telephoneFormatError"/>", "warn");
			return false;
		}else if(legalRepTelephone.length>20){
                $("#legalRepTelephone").trigger("focus");
                $.alert("<spring:message code="message.listForm.faRenDianHua"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#legalRepTelephone").val(legalRepTelephone);

		var legalRepHandphone = $.trim($("#legalRepHandphone").val());
		if (legalRepHandphone == null || legalRepHandphone == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.faRenShouJi"/>！",  "warn");
			return false;
		} else if (!/^(\d+[-]\d+)|(\d+)$/.test(legalRepHandphone)) {
			$.alert("<spring:message code="message.lable.mobilephoneFormatError"/>", "warn");
			return false;
		}else if(legalRepHandphone.length>20){
                $("#legalRepHandphone").trigger("focus");
                $.alert("<spring:message code="message.listForm.faRenShouJi"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#legalRepHandphone").val(legalRepHandphone);
		
		var bizScope = $.trim($("#bizScope").val());
		if (bizScope == null || bizScope == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.shengChanJingYingFanWei"/>！", "warn");
			return false;
		}else if(bizScope.length>1333){
                $("#bizScope").trigger("focus");
                $.alert("<spring:message code="message.listForm.shengChanJingYingFanWei"/><spring:message code="message.info.zuiDaChangDu"/>1333<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#bizScope").val(bizScope);

		var taxCode = $.trim($("#taxCode").val());
		if (taxCode == null || taxCode == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.shuiWuDengJiZhengHao"/>！", "warn");
			return false;
		} else if (!/^[a-zA-Z0-9_]+$/.test(taxCode)) {
			$.alert("<spring:message code="message.listForm.shuiWuDengJiZhengHao"/><spring:message code="message.yanZheng.zhiNengYouZiMuShuZiZuCheng"/>！", "warn");
			return false;
		}else if(taxCode.length>33){
                $("#taxCode").trigger("focus");
                $.alert("<spring:message code="message.listForm.shuiWuDengJiZhengHao"/><spring:message code="message.info.zuiDaChangDu"/>33<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#taxCode").val(taxCode);
		

		var indusCode = $.trim($("#indusCode").val());
		if (indusCode == null || indusCode == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.shengChanJingYingXuKeZhengHao"/>！", "warn");
			return false;
		} else if (!/^[a-zA-Z0-9_]+$/.test(indusCode)) {
			$.alert("<spring:message code="message.listForm.shengChanJingYingXuKeZhengHao"/><spring:message code="message.yanZheng.zhiNengYouZiMuShuZiZuCheng"/>", "warn");
			return false;
		}else if(indusCode.length>33){
                $("#indusCode").trigger("focus");
                $.alert("<spring:message code="message.listForm.shengChanJingYingXuKeZhengHao"/><spring:message code="message.info.zuiDaChangDu"/>33<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#indusCode").val(indusCode);

		

		var indusCodeStartDate = $.trim($("#indusCodeStartDate").val());
		if (indusCodeStartDate == null || indusCodeStartDate == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.shengChanJingYingXuKeZhengStart"/>！", "warn");
			return false;
		}

		var indusCodeEndDate = $.trim($("#indusCodeEndDate").val());
		if (indusCodeEndDate == null || indusCodeEndDate == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.shengChanJingYingXuKeZhengEnd"/>！", "warn");
			return false;
		}
		
		
		var bizLiceNo = $.trim($("#bizLiceNo").val());
		if (bizLiceNo == null || bizLiceNo == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.yingYeZhiZhaoHao"/>！", "warn");
			return false;
		} else if (!/^[a-zA-Z0-9_]+$/.test(bizLiceNo)) {
			$.alert("<spring:message code="message.listForm.yingYeZhiZhaoHao"/><spring:message code="message.yanZheng.zhiNengYouZiMuShuZiZuCheng"/>", "warn");
			return false;
		}else if(bizLiceNo.length>33){
                $("#bizLiceNo").trigger("focus");
                $.alert("<spring:message code="message.listForm.yingYeZhiZhaoHao"/><spring:message code="message.info.zuiDaChangDu"/>33<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#bizLiceNo").val(bizLiceNo);

		var bizLiceStartDate = $.trim($("#bizLiceStartDate").val());
		if (bizLiceStartDate == null || bizLiceStartDate == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoStart"/><spring:message code="message.listForm.time"/>！", "warn");
			return false;
		}

		var bizLiceEndDate = $.trim($("#bizLiceEndDate").val());
		if (bizLiceEndDate == null || bizLiceEndDate == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoEnd"/><spring:message code="message.listForm.time"/>！", "warn");
			return false;
		}

		var legalRepCertCode = $.trim($("#legalRepCertCode").val());
		if (legalRepCertCode == null || legalRepCertCode == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoHao"/>！", "warn");
			return false;
		} else if (!/^[a-zA-Z0-9_]+$/.test(legalRepCertCode)) {
			$.alert("<spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoHao"/><spring:message code="message.yanZheng.zhiNengYouZiMuShuZiZuCheng"/>",  "warn");
			return false;
		}else if(legalRepCertCode.length>33){
                $("#legalRepCertCode").trigger("focus");
                $.alert("<spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoHao"/><spring:message code="message.info.zuiDaChangDu"/>33<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#legalRepCertCode").val(legalRepCertCode);
		
		var legalRepStartDate = $.trim($("#legalRepStartDate").val());
		if (legalRepStartDate == null || legalRepStartDate == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoStart"/>", "warn");
			return false;
		}
		
		var legalRepEndDate = $.trim($("#legalRepEndDate").val());
		if (legalRepEndDate == null || legalRepEndDate == "") {
			$.alert("<spring:message code="message.select.option"/><spring:message code="message.listForm.qiYeFaRenYingYeZhiZhaoEnd"/>", "warn");
			return false;
		}
		
		var contactName = $.trim($("#contactName").val());
		if (contactName == null || contactName == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.liangXiRenXingMing"/>！", "warn");
			return false;
		}else if(contactName.length>20){
                $("#contactName").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenXingMing"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#contactName").val(contactName);

		var contactIdnum = $.trim($("#contactIdnum").val());
		if (contactIdnum == null || contactIdnum == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.liangXiRenShengFenZheng"/>！", "warn");
			return false;
		} else if (!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/.test(contactIdnum)) {
			$.alert("<spring:message code="message.listForm.liangXiRenShengFenZheng"/><spring:message code="message.lable.FormatError"/>", "warn");
			return false;
		}else if(contactIdnum.length>18){
                $("#contactIdnum").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenShengFenZheng"/><spring:message code="message.info.zuiDaChangDu"/>18<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#contactIdnum").val(contactIdnum);

		var contactPos = $.trim($("#contactPos").val());
		if (contactPos == null || contactPos == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.liangXiRenZhiWu"/>！", "warn");
			return false;
		}else if(contactPos.length>21){
                $("#contactPos").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenZhiWu"/><spring:message code="message.info.zuiDaChangDu"/>21<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#contactPos").val(contactPos);

		var contactTelephone = $.trim($("#contactTelephone").val());
		if (contactTelephone == null || contactTelephone == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.liangXiRenDianHua"/>！", "warn");
			return false;
		} else if (!/^(\d+[-]\d+)|(\d+)$/.test(contactTelephone)) {
			$.alert("<spring:message code="message.lable.telephoneFormatError"/>", "warn");
			return false;
		}else if(contactTelephone.length>20){
                $("#contactTelephone").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenDianHua"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#contactTelephone").val(contactTelephone);

		var contactHandphone = $.trim($("#contactHandphone").val());
		if (contactHandphone == null || contactHandphone == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.liangXiRenShouJi"/>！",  "warn");
			return false;
		} else if (!/^(\d+[-]\d+)|(\d+)$/.test(contactHandphone)) {
			$.alert("<spring:message code="message.lable.mobilephoneFormatError"/>","warn");
			return false;
		}else if(contactHandphone.length>20){
                $("#contactHandphone").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenShouJi"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#contactHandphone").val(contactHandphone);

		var contactEmail = $.trim($("#contactEmail").val());
		if (contactEmail == null || contactEmail == "") {
			$.alert("<spring:message code="message.yanZheng.qingShuRu"/><spring:message code="message.listForm.liangXiRenYouXiang"/>！", "warn");
			return false;
		} else if (!/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(contactEmail)) {
			$.alert("<spring:message code="message.lable.dianZiYouXiangError"/>", "warn");
			return false;
		}else if(contactEmail.length>20){
                $("#contactEmail").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenYouXiang"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		$("#contactEmail").val(contactEmail);

		var contactQQ = $.trim($("#contactQq").val());
		if(contactQQ != null && contactQQ != ""){
			if (!/^\d+[a-zA-Z0-9]$/.test(contactQQ)) {
				$.alert("<spring:message code="message.listForm.liangXiRenQQ"/><spring:message code="message.lable.daYuLingDeShu"/>！", "warn");
				return false;
			}else if(contactQQ.length>20){
                $("#contactQQ").trigger("focus");
                $.alert("<spring:message code="message.listForm.liangXiRenQQ"/><spring:message code="message.info.zuiDaChangDu"/>20<spring:message code="message.info.geZiFu"/>！", "warn");
                return false;
		}
		}
		$("#contactQq").val(contactQQ);
		
		return true;
	}
	
    </script>
</body>
</html>
